#include <iostream>
#include <stdio.h>
#include "socket/server.h"
#include <memory.h>
int main() {
	printf("server start\n");
	socket_server socketServer(1130);
	socketServer.create();
	while (1){
		int fd = socketServer.Accept();
		char buf[1024];
		memset(buf,0,1024);
		int cnt = socketServer.Recv(fd,buf,1024);
		printf("%s\n 接收:%d",buf,cnt);
		char b[] = "hello ,a msg from server\n";
		socketServer.Send(fd,b,strlen(b));
	}
	return 0;
}
